﻿using Bootstrap.Security;
using Longbow.Cache;
using Longbow.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Bootstrap.DataAccess.Model;
using Longbow.Web.Mvc;
using PetaPoco;

namespace Bootstrap.DataAccess
{
    /// <summary>
    /// 座席状态统计
    /// </summary>
    public static class AgentStatusStatisticsHelper
    {
        public const string RetrieveAgentStatusStatisticsDataKey = "UserHelper-RetrieveAgentStatusStatistics";
        public const string RetrieveAgentStatusStatisticsByRoleIdDataKey = "UserHelper-RetrieveAgentStatusStatisticsByRoleId";
        public const string RetrieveAgentStatusStatisticsByGroupIdDataKey = "UserHelper-RetrieveAgentStatusStatisticsByGroupId";
        public const string RetrieveNewAgentStatusStatisticsDataKey = "UserHelper-RetrieveNewAgentStatusStatistics";
        public const string RetrieveAgentStatusStatisticsByNameDataKey = "BootstrapUser-RetrieveAgentStatusStatisticsByName";

        /// <summary>
        /// 查询座席状态统计
        /// </summary>
        /// <returns></returns>
        public static Page<AgentStatusStatistics> RetrievePages(PaginationOption op, DateTime? startTime, DateTime? endTime,
            string CallerID, string CalleeID, string AgentNo, string CallDir) =>
            DbContextManager.Create<AgentStatusStatistics>().RetrievePages(op, startTime, endTime, CallerID, CalleeID, AgentNo, CallDir);



    }
}
